Tables [dbo].[RoleMain]
Properties
PropertyValue
Created10:31:37 AM Tuesday, March 02, 2010
Last Modified1:20:16 PM Thursday, February 23, 2012
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_RoleMain: RoleKeyRoleKeyuniqueidentifier16
No
(newid())
Namenvarchar(50)100
No
('')
Descriptionnvarchar(250)500
No
('')
IsSystembit1
No
((0))
Foreign Keys FK_RoleMain_UserMain_UpdatedBy: [dbo].[UserMain].UpdatedByUserKeyIndexes IX_RoleMain_UpdatedByUserKey: UpdatedByUserKeyUpdatedByUserKeyuniqueidentifier16
No
UpdatedOndatetime8
No
(getdate())
MarkedForDeleteOndatetime8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_RoleMain: RoleKeyPK_RoleMainRoleKey
Yes
IX_RoleMain_UpdatedByUserKeyUpdatedByUserKey
Foreign Keys Foreign Keys
NameColumns
FK_RoleMain_UserMain_UpdatedByUpdatedByUserKey->[dbo].[UserMain].[UserKey]
SQL Script
CREATE TABLE [dbo].[RoleMain]
(
[RoleKey] [uniqueidentifier] NOT NULL CONSTRAINT [DF_RoleMain_RoleKey] DEFAULT (newid()),
[Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_RoleMain_Name] DEFAULT (''),
[Description] [nvarchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_RoleMain_Description] DEFAULT (''),
[IsSystem] [bit] NOT NULL CONSTRAINT [DF_RoleMain_IsSystem] DEFAULT ((0)),
[UpdatedByUserKey] [uniqueidentifier] NOT NULL,
[UpdatedOn] [datetime] NOT NULL CONSTRAINT [DF_RoleMain_UpdatedOn] DEFAULT (getdate()),
[MarkedForDeleteOn] [datetime] NULL
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[RoleMain] ADD CONSTRAINT [PK_RoleMain] PRIMARY KEY CLUSTERED ([RoleKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RoleMain_UpdatedByUserKey] ON [dbo].[RoleMain] ([UpdatedByUserKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RoleMain] ADD CONSTRAINT [FK_RoleMain_UserMain_UpdatedBy] FOREIGN KEY ([UpdatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
Uses
Used By